package presentation.utilimport kotlinx.datetime.Instantimport kotlinx.datetime.LocalDateTimeimport kotlinx.datetime.TimeZoneimport kotlinx.datetime.toLocalDateTimefun String?.toLocalDateTimeOrNull(): LocalDateTime? {    return if (!this.isNullOrBlank()) {        try {            Instant.parse(this).toLocalDateTime(TimeZone.UTC)        } catch (e: Exception) {            null        }    } else null}/** * Converts a nullable ISO-8601 formatted string to a [LocalDateTime] (UTC timezone). * Returns `null` if: * - The input is `null`/blank, or * - Parsing fails (e.g., invalid format). * * Note: Consider logging parse failures in debug mode if invalid inputs are unexpected. * Example valid input: "2024-01-01T12:00:00Z". */